SofthouseChara / Wizard's Climber Script tool
---------------------------------------------

This is a program to extract and replace text, images, and object files from SofthouseChara games.

Extracting Text
---------------
Pick the file to extract from (box.vfs)
Pick a path to extract to.
Make sure "Extract All Codes" is checked.
Click the Extract button.

Editing Text (Wizard's Climber, Bunny Black)
--------------------------------------------
Text encoding is SHIFT-JIS for Wizard's Climber, and UTF-8 for Bunny Black, with CRLF line ends.
Blank lines and lines beginning with comments // are ignored.
Lines that split paragraphs (#) should not have any other characters on that line besides the #.
Lines will be wrapped at 50 characters.
Paragraphs are split after 4 lines.
Do not add anything to the beginning or end of lines containing tags < >
Do not add anything to the beginning of lines that contain byte codes \xNN
Labels are lines that begin with ':' then contain a label name, like ':label'.  There may be a plus or minus after the label name to indicate that the actual address of the label is ahead or behind the location in the text.
References to a label look like ':label:', and have colons on both side.  They are seen inside blocks of bytecode, and inside <choice> tags.

Note: Tool does not currently support all the codes, but does try to identify strings, numbers, and labels.

Editing Text (Suzukuri Dragon)
------------------------------
Text encoding is SHIFT-JIS, with CRLF line ends.
Blank lines, lines containing only whitespace, and comments // are ignored.
Supports all instructions used, but some features are not 100% complete (such as @IF operators)
If you want a blank line of text, or a line contianing only whitespace, use @TEXT ""
Any line not contining code is treated as a @TEXT "" line.
If you are manually using a @TEXT "" command, you must escape quotation marks with a backslash \"

If you are using Text only mode ("Extract All Codes" is unchecked), it will run in String Dump mode instead, and will be annotated with comments.

Replacing Text
--------------
Pick the file to re-insert text into (box.vfs)
Pick the path containing the changed files (Same directory as before, will now have a bunch of subdirectories with names ending with ".box")
Make sure "Extract All Codes" is checked if you used this when you extracted the text.
Click the Replace button.


Extracting Images
-----------------
Pick a file containing IPH format images (such as chip.vfs)

Editing Images
--------------
Images are in PNG format with alpha channel.  Use an image editing tool that supports alpha channels, or else you will lose transparency.
IPH format is a 16-bit color format, and it supports three different levels of transparency: Opaque, completely transparent, and 50% transparent.
When repacking images, alpha will be rounded to either 0%, 50%, or 100%.
A file may contain multiple frames of animation.  They will either be stacked on top of each other, or laid out side-by-side.
Information necessary to reconstruct the IPH file is stored into a "metadata" file.  If you need to change the position of the image or add a transparent color, you may need to change this.

Metadata files
--------------
These are 32 byte long binary files, use a hex editor to change them.
00: ???
04: X position to display the image at
08: Y position to display the image at
0C: Width of an animation frame
10: Height of an animation frame
14: Transparent color (pixels matching this color become transparent), or 80000000 for no transparent color
18: The original fourcc code. May be "IPH\0", "IPH ", or others.
1C: The 'file format' of the image, 00 or 01.


Extracting OBJ files
--------------------
Pick a file that contains OBJ files (like obj.vfs)

Editing OBJ files
-----------------
Text encoding is SHIFT-JIS (or UTF-8 for newer games which use Unicode), with CRLF line ends.
Blank lines and lines beginning with comments // are ignored.
Do not add any lines of text.  Do not delete any lines of text.  Do not blank out lines of text.
Even if you change data here, there may be other places that still refer to the data by the old names, such as script files and within the EXE itself.  Those need to be changed as well.
Not all lines need to be changed, some lines of text are never displayed, so they should be left alone.
